package com.bestcem.xm.user.service;

import com.bestcem.xm.common.core.domain.web.ServiceResult;
import com.bestcem.xm.user.service.dto.user.OrganizationCustomSettingDTO;

import java.util.List;

/**
 * 租户自定义配置信息服务
 *
 * @author qiongyu.cui <qiongyu.cui@idiaoyan.com>
 * @version v1.0
 * @date 2022/5/10 10:58
 */
public interface OrganizationCustomSettingService {

    /**
     * 根据主键id查询租户自定义配置信息
     *
     * @param id 主键
     * @return com.bestcem.xm.util.ServiceResult<com.bestcem.xm.user.service.dto.user.OrganizationCustomSettingDTO>
     * @author cuiqiongyu <qiongyu.cui@idiaoyan.cn>
     * @date 2022/05/10 11:02
     */
    public ServiceResult<OrganizationCustomSettingDTO> selectById(String id);

    /**
     * 根据相关字段查询租户自定义配置信息列表
     *
     * @param settingDTO 配置信息
     * @return com.bestcem.xm.util.ServiceResult<java.util.List < com.bestcem.xm.user.service.dto.user.OrganizationCustomSettingDTO>>
     * @author cuiqiongyu <qiongyu.cui@idiaoyan.cn>
     * @date 2022/05/10 11:03
     */
    public ServiceResult<List<OrganizationCustomSettingDTO>> selectBySelective(OrganizationCustomSettingDTO settingDTO);

    /**
     * 新增租户自定义配置信息
     *
     * @param settingDTO 自定义配置信息
     * @return com.bestcem.xm.util.ServiceResult<java.lang.String>
     * @author cuiqiongyu <qiongyu.cui@idiaoyan.cn>
     * @date 2022/05/10 11:03
     */
    public ServiceResult<String> insertSelective(OrganizationCustomSettingDTO settingDTO);

    /**
     * 根据主键id删除自定义配置信息
     *
     * @param id 主键id
     * @return com.bestcem.xm.util.ServiceResult<java.lang.Void>
     * @author cuiqiongyu <qiongyu.cui@idiaoyan.cn>
     * @date 2022/05/10 11:03
     */
    public ServiceResult<Void> deleteById(String id);

    /**
     * 根据orgId和enable查询租户自定义配置信息
     *
     * @param orgId  租户id
     * @param enable 是否启用
     * @return com.bestcem.xm.util.ServiceResult<com.bestcem.xm.user.service.dto.user.OrganizationCustomSettingDTO>
     * @author cuiqiongyu <qiongyu.cui@idiaoyan.cn>
     * @date 2022/05/10 14:26
     */
    public ServiceResult<OrganizationCustomSettingDTO> selectByOrgIdAndEnable(String orgId, boolean enable);

    /**
     * 根据domain和enable查询租户自定义配置信息
     *
     * @param domain 域名
     * @param enable 是否启用
     * @return com.bestcem.xm.util.ServiceResult<com.bestcem.xm.user.service.dto.user.OrganizationCustomSettingDTO>
     * @author cuiqiongyu <qiongyu.cui@idiaoyan.cn>
     * @date 2022/05/10 15:35
     */
    public ServiceResult<OrganizationCustomSettingDTO> selectBydomainAndEnable(String domain, boolean enable);

}
